import request from "@/utils/request";

//  查询部门列表
export const getDepartmentListApi = (params) => {
  return request({
    url: "/company/department",
    method: "get",
    params,
  });
};
//  查询部门详情
export const getDepartmentInfoApi = (id) => {
  return request({
    url: "/company/department/" + id,
    method: "get",
  });
};
// 新增部门
export const addDepartmentApi = (data) => {
  return request({
    url: "/company/department/",
    method: "post",
    data,
  });
};
// 修改部门
export const editDepartmentApi = (data) => {
  return request({
    url: "/company/department/" + data.id,
    method: "put",
    data,
  });
};
// 删除部门
export const delDepartmentApi = (id) => {
  return request({
    url: "/company/department/" + id,
    method: "delete",
  });
};
